LIBS = -ll8w8jwt -lmbedcrypto -lmbedx509 -lmysqlclient -lcrypt
LIB_PATH = -L/home/ubuntu/l8w8jwt/build/mbedtls/library
INC_PATH = -I/home/ubuntu/l8w8jwt/build/mbedtls/include

SRCS := $(wildcard *.c)
OBJS := $(patsubst %.c, %.o, $(SRCS))
BIN := CloudiskServer
CC := gcc
CFLAGS = -w -g $(INC_PATH)

ALL: $(BIN)

$(BIN): $(OBJS)
	$(CC) -o $@ $^ $(CFLAGS) $(LIB_PATH) $(LIBS)

%.o: %.c
	$(CC) -c $< -o $@ $(CFLAGS)

.PHONY: clean rebuild ALL

clean:
	$(RM) $(OBJS) $(BIN)

rebuild: clean ALL

